function [ w ] = calc_w( theta, lambda, N )
% Calculates w
d = lambda / 2;
phi = (1i*2*pi*d*sind(theta))/lambda;
w = zeros(N, 1);
for a=1:N
    w(a) = exp((a-1)*phi);
end

end

